<?php if ($this->pageCount){ ?>
    <div class="paginationControl" align="center">
        <?php 
            if (isset($this->previous)){
                if($this->type == 'transaction'){
                    echo '<a class="prev item" href="' . $this->url(array('bntSubmit'=>'Tìm','username'=>$this->username,'dateStart'=>$this->dateStart,'dateEnd'=>$this->dateEnd,'channel'=>$this->channel,'serverId'=>$this->serverId,'status'=>$this->status,'page' => $this->previous)). '">Previous</a>';
                }elseif($this->type == 'exchange'){
                    echo '<a class="prev item" href="' . $this->url(array('bntSubmit'=>'Tìm','minGold'=>$this->minGold,'maxGold'=>$this->maxGold,'dateStart'=>$this->dateStart,'dateEnd'=>$this->dateEnd,'channel'=>$this->channel,'serverId'=>$this->serverId,'page' => $this->previous)). '">Previous</a>';
                }elseif($this->type == 'shopping'){
                    if(isset($this->date)){
                        echo '<a class="prev item" href="' . $this->url(array('bntSubmit'=>'Tìm','item'=>$this->item,'date'=>$this->date,'channel'=>$this->channel,'serverId'=>$this->serverId,'status'=>$this->status,'page' => $this->previous)). '">Previous</a>';
                    }else{
                        echo '<a class="prev item" href="' . $this->url(array('bntSubmit'=>'Tìm','item'=>$this->item,'dateStart'=>$this->dateStart,'dateEnd'=>$this->dateEnd,'channel'=>$this->channel,'serverId'=>$this->serverId,'status'=>$this->status,'page' => $this->previous)). '">Previous</a>';
                    }
                }elseif($this->type == 'item'){
                    
                }
            }
            foreach ($this->pagesInRange as $page){
                if ($page != $this->current){
                    if($this->type == 'transaction'){
                        echo  '<a class="numb item" href="' . $this->url(array('bntSubmit'=>'Tìm','username'=>$this->username,'dateStart'=>$this->dateStart,'dateEnd'=>$this->dateEnd,'channel'=>$this->channel,'serverId'=>$this->serverId,'status'=>$this->status,'page' => $page)). '">' . $page . '</a>';
                    }elseif($this->type == 'exchange'){
                        echo  '<a class="numb item" href="' . $this->url(array('bntSubmit'=>'Tìm','minGold'=>$this->minGold,'maxGold'=>$this->maxGold,'dateStart'=>$this->dateStart,'dateEnd'=>$this->dateEnd,'channel'=>$this->channel,'serverId'=>$this->serverId,'page' => $page)). '">' . $page . '</a>';
                    }elseif($this->type == 'shopping'){
                        if(isset($this->date)){
                            echo  '<a class="numb item" href="' . $this->url(array('bntSubmit'=>'Tìm','item'=>$this->item,'date'=>$this->date,'channel'=>$this->channel,'serverId'=>$this->serverId,'status'=>$this->status,'page' => $page)). '">' . $page . '</a>';
                        }else{
                            echo  '<a class="numb item" href="' . $this->url(array('bntSubmit'=>'Tìm','item'=>$this->item,'dateStart'=>$this->dateStart,'dateEnd'=>$this->dateEnd,'channel'=>$this->channel,'serverId'=>$this->serverId,'status'=>$this->status,'page' => $page)). '">' . $page . '</a>';
                        }
                    }elseif($this->type == 'item'){
                        
                    }
                }else{
                    echo '<span class="numb item">' . $page . '</span>';
                }
            }
            if (isset($this->next)){
                if($this->type == 'transaction'){
                    echo '<a class="next item" href="' . $this->url(array('bntSubmit'=>'Tìm','username'=>$this->username,'dateStart'=>$this->dateStart,'dateEnd'=>$this->dateEnd,'channel'=>$this->channel,'serverId'=>$this->serverId,'status'=>$this->status,'page' => $this->next)) . '">Next</a>';
                }elseif($this->type == 'exchange'){
                    echo '<a class="next item" href="' . $this->url(array('bntSubmit'=>'Tìm','minGold'=>$this->minGold,'maxGold'=>$this->maxGold,'dateStart'=>$this->dateStart,'dateEnd'=>$this->dateEnd,'channel'=>$this->channel,'serverId'=>$this->serverId,'page' => $this->next)) . '">Next</a>';
                }elseif($this->type == 'shopping'){
                    if(isset($this->date)){
                        echo '<a class="next item" href="' . $this->url(array('bntSubmit'=>'Tìm','item'=>$this->item,'date'=>$this->date,'channel'=>$this->channel,'serverId'=>$this->serverId,'status'=>$this->status,'page' => $this->next)) . '">Next</a>';
                    }else{
                        echo '<a class="next item" href="' . $this->url(array('bntSubmit'=>'Tìm','item'=>$this->item,'dateStart'=>$this->dateStart,'dateEnd'=>$this->dateEnd,'channel'=>$this->channel,'serverId'=>$this->serverId,'status'=>$this->status,'page' => $this->next)) . '">Next</a>';
                    }
                }elseif($this->type == 'item'){
                    
                }
            }
        ?>
        <div class="clear-both"></div>
    </div>
<?php } ?>